package com.fangmu.transferdata.serialportcontract;

/**
 * @auther created by lyl
 * @date 2022/4/7.
 */

/**
 * 存放协议内容
 */
public class Contract {
    /**
     * 通知下位机跳转到底层
     */
    public static final String informIntent_SEND = "EB90A0010D0A";
    public static final String informIntent_RECEIVED = "EB90A001FF0D0A";

    /**
     * 与下位机握手
     */
    public static final String shakeHands_SEND = "EB90B0010D0A";
    public static final String shakeHands_RECEIVED = "EB906AA6FF0D0A";

    /**
     * 3.通知下位机擦除数据
     * @param hex EB90B0020D0A
     * @return EB90B002FF0D0A
     */
    public static final String eraseData_SEND = "EB90B0020D0A";
    public static final String eraseData_RECEIVED = "EB90B002FF0D0A";

    /**
     * 4.向下位机发送文件大小 32796
     * @param hex EB90B003 XX,XX,XX,XX
     * @return EB90B003FF0D0A
     */
    public static final String sendFileSize_SEND = "EB90B003";
    public static final String sendFileSize_RECEIVED = "EB90B003FF0D0A";

    /**
     * 5.发送文件内容
     * @param hex EB90B004
     * @return EB90B004EE0D0A 错误
     * EB90B004FF0D0A 成功
     */
    public static final String sendFileInput_SEND = "EB90B004";
    public static final String sendFileInput_RECEIVED_SUCCESSED = "EB90B004FF0D0A";
    public static final String sendFileInput_RECEIVED_ERROR = "EB90B004EE0D0A";

    /**
     * 6.通知下位机跳转到app层，延时3秒向下位机询问是否跳转成功
     * @param hex EB90B0050D0A
     */
    public static final String informIntentApp_SEND = "EB90B0050D0A";

    /**
     * 二次握手，向下位机询问是否跳转成功
     * @param hex  EB90A0020D0A
     * @return EB90A002FF0D0A
     */
    public static final String isIntentApp_SEND = "EB90A0020D0A";
    public static final String isIntentApp_RECEIVED = "EB90A002FF0D0A";
}
